﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Common;

using System.IO;
using System.Data;
using System.Data.SqlClient;

namespace Dal
{
    public partial class Set
    {
        /// <summary>
        /// 查询缴费记录
        /// </summary>
        /// <param name="strxmldata"></param>
        /// <returns></returns>
        public static DataSet SetPayInfoQuery(string strxmldata)
        {
            DataSet ds = null;
            try
            {
                string sqlCmdtext = "USP_Set_PayInfo_QUERY";
                sqlhelper dal = new sqlhelper();
                SqlCommand sqlcmd = dal.GetSqlCommand(sqlCmdtext, CommandType.StoredProcedure);
                dal.AddParameter(sqlcmd, "@data", DbType.String, strxmldata);

                ds = dal.GetDataSet(sqlcmd);
                return ds;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        /// <summary>
        /// 更新缴费记录
        /// </summary>
        /// <param name="strxmldata"></param>
        /// <param name="strtype"></param>
        /// <returns></returns>
        public static DataSet SetPayInfoSave(string strxmldata, string strtype)
        {
            DataSet ds = null;
            try
            {
                string sqlCmdtext = "USP_Set_PayInfo";
                sqlhelper dal = new sqlhelper();
                SqlCommand sqlcmd = dal.GetSqlCommand(sqlCmdtext, CommandType.StoredProcedure);
                dal.AddParameter(sqlcmd, "@data", DbType.String, strxmldata);
                dal.AddParameter(sqlcmd, "@type", DbType.String, strtype);
                ds = dal.GetDataSet(sqlcmd);
                return ds;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

    }
}
